package com.fqy.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.SQLException;

public class ExitServlet extends HttpServlet {
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
            try{
                IndexServlet.IS.con.close();
            }catch (SQLException e) {
                e.printStackTrace();
            }
        req.getRequestDispatcher("/index.html").forward(req, resp);
                //resp.sendRedirect("http://localhost:63342/untitled/src/main/webapp/index.html");
    }
}
